/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tree;

import java.text.DateFormat;

/**
 * Vnitrni forma: program.
 */
public class ProgramTree extends Tree {


    private BlockTree block;

    public ProgramTree(Position start, Position end,  BlockTree block) {
        super(start, end);

        this.block = block;
    }

    public BlockTree getBlock() {
        return block;
    }

    @Override
    public void accept(TreeVisitor visitor) {
           visitor.visitProgram(this);
    }
    @Override
    public void generate(Context ctx) {
        block.generate(ctx);
    }

    @Override
    public String toString() {
        return String.format("Program %s: ['%s']", super.toString(),  block);
    }
}
